home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_04 / plauger / ios < prev   
Encoding:
Text File  |  1994-02-12  |  2.9 KB  |  105 lines

  1. class ios {
  2. public:
  3.     class failure public: xmsg {
  4.     public:
  5.         failure(const char* where_val = 0, const char* why_val = 0);
  6.         virtual ~failure();
  7.     protected:
  8. //        virtual void do_raise();    inherited
  9.     };
  10.     typedef T1 fmtflags;
  11.     static const fmtflags dec;
  12.     static const fmtflags fixed;
  13.     static const fmtflags hex;
  14.     static const fmtflags internal;
  15.     static const fmtflags left;
  16.     static const fmtflags oct;
  17.     static const fmtflags right;
  18.     static const fmtflags scientific;
  19.     static const fmtflags showbase;
  20.     static const fmtflags showpoint;
  21.     static const fmtflags showpos;
  22.     static const fmtflags skipws;
  23.     static const fmtflags unitbuf;
  24.     static const fmtflags uppercase;
  25.     static const fmtflags adjustfield;
  26.     static const fmtflags basefield;
  27.     static const fmtflags floatfield;
  28.     typedef T2 iostate;
  29.     static const iostate badbit;
  30.     static const iostate eofbit;
  31.     static const iostate failbit;
  32.     static const iostate goodbit;
  33.     typedef T3 openmode;
  34.     static const openmode app;
  35.     static const openmode ate;
  36.     static const openmode binary;
  37.     static const openmode in;
  38.     static const openmode out;
  39.     static const openmode trunc;
  40.     typedef T4 seekdir;
  41.     static const seekdir beg;
  42.     static const seekdir cur;
  43.     static const seekdir end;
  44. //    typedef T5 io_state;    optional
  45. //    typedef T6 open_mode;    optional
  46. //    typedef T7 seek_dir;    optional
  47.     class Init {
  48.     public:
  49.         Init();
  50.         ~Init();
  51.     private:
  52. //        static int init_cnt;    exposition only
  53.     };
  54.     ios(streambuf* sb_arg);
  55.     virtual ~ios();
  56.     operator void*() const
  57.     int operator!() const
  58.     ios& copyfmt(const ios& rhs);
  59.     ostream* tie() const;
  60.     ostream* tie(ostream* tiestr_arg);
  61.     streambuf* rdbuf() const;
  62.     streambuf* rdbuf(streambuf* sb_arg);
  63.     iostate rdstate() const;
  64.     void clear(iostate state_arg = 0);
  65. //    void clear(io_state state_arg = 0);    optional
  66.     void setstate(iostate state_arg);
  67. //    void setstate(io_state state_arg);    optional
  68.     int good() const;
  69.     int eof() const;
  70.     int fail() const;
  71.     int bad() const;
  72.     iostate exceptions() const;
  73.     void exceptions(iostate except_arg);
  74. //    void exceptions(io_state except_arg);    optional
  75.     fmtflags flags() const;
  76.     fmtflags flags(fmtflags fmtfl_arg);
  77.     fmtflags setf(fmtflags fmtfl_arg);
  78.     fmtflags setf(fmtflags fmtfl_arg, fmtflags mask);
  79.     void unsetf(fmtflags mask);
  80.     int fill() const;
  81.     int fill(int ch);
  82.     int precision() const;
  83.     int precision(int prec_arg);
  84.     int width() const;
  85.     int width(int wide_arg);
  86.     static int xalloc();
  87.     long& iword(int index_arg);
  88.     void*& pword(int index_arg);
  89. protected:
  90.     ios();
  91.     init(streambuf* sb_arg);
  92. private:
  93. //    streambuf* sb;    exposition only
  94. //    ostream* tiestr;    exposition only
  95. //    iostate state;    exposition only
  96. //    iostate except;    exposition only
  97. //    fmtflags fmtfl;    exposition only
  98. //    int prec;    exposition only
  99. //    int wide;    exposition only
  100. //    char fillch;    exposition only
  101. //    static int index;    exposition only
  102. //    int* iarray;    exposition only
  103. //    void** parray;    exposition only
  104. };
  105.